<form id="pagerForm" action="__URL__" method="get">   <!-- action="#rel#" -->
    <input type="hidden" name="p" value="1" />
    <input type="hidden" name="numPerPage" value="{$numPerPage}" />
    <input type="hidden" name="orderField" value="{$orderField}" />
    <input type="hidden" name="orderDirection" value="{$param.orderDirection}" />
</form>
        <div class="subBar">
            <ul>
            </ul>
        </div>
    </div>
    </form>
</div>

<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <if condition="in_array('insert', $privilegelist)">
                <li><a class="add" href="__URL__/add" rel="adminadd" target="dialog"><span>添加</span></a></li>
                <li class="line">line</li>
            </if>
            <if condition="in_array('delete', $privilegelist)">
            <li><a title="确实要删除这些记录吗?" target="selectedTodo" rel="ids" href="__URL__/delAll" postType="string" class="delete"><span>批量删除</span></a></li>
            <li class="line">line</li>
            </if>
            <if condition="in_array('edit', $privilegelist)">
            <li><a class="edit" href="__URL__/edit/id/{menu_id}" rel="adminmenuedit"target="dialog" warn="请选择一条记录"><span>修改</span></a></li>
            </if>
        </ul>
    </div>

    <table class="table" width="100%" layoutH="75">
        <thead>

            <tr>
            <if condition="in_array('delete', $privilegelist)">
            <th>
                <input type="checkbox" group="ids" class="checkboxCtrl" />
            </th>
            </if>
            <th>菜单名称</th>
            <th>排序</th>
            <th>操作</th>
            </tr>
        </thead>
        <tbody>
        <foreach name="list" item="menu">
        	
            <if condition="$menu.layer eq 1 "> 
            	<tr rel="{$menu.menu_id}" target="menu_id">
            <else />
             	 <tr rel="{$menu.menu_id}" target="menu_id" name="isLeaf_<?php echo $nextid; ?>" style="display:none;">
            </if>

                <if condition="in_array('delete', $privilegelist)">
                <td>
                    <input name="ids" value="{$menu.menu_id}" type="checkbox"/>
                </td>
                </if>
                <td>
                    <?php $space = str_repeat('-', 6); echo str_repeat($space, $menu['layer'] - 1); ?>
                    <if condition="$menu.layer eq 1"> 
                    	<?php $nextid = $menu[menu_id]; ?>
                        <a href="javascript:void(0);" onclick="$('tr[name^=isLeaf_]').hide();$('tr[name=isLeaf_{$menu.menu_id}]').show(100);" title="查询菜单下一子级">{$menu.menu_title}</a>
                     <else />
                         <a href="javascript:void(0);">{$menu.menu_title}</a>
                     </if>

                </td>
                <td>
                    {$menu.sortnum}
                </td>
                <td>
                   
                    <if condition="in_array('edit', $privilegelist)">
                    	 <a title="编辑" target="dialog" href="__URL__/edit/id/{$menu.menu_id}" class="btnEdit">编辑</a>
                    </if>
                    
                    <if condition="in_array('delete', $privilegelist)">
						<a title="删除" target="ajaxTodo" href="__URL__/delete/id/{$menu.menu_id}" 
                    class="btnDel">删除</a>
                    </if>
                </td>
            </tr>
        </foreach>
        </tbody>
    </table>
    <div class="panelBar">
        <div class="pages">
            <span>显示</span>
            <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
                <option value="20" <?php echo $numPerPage == 20 ? 'selected="true"' : '' ; ?> >20</option>
                <option value="50" <?php echo $numPerPage == 50 ? 'selected="true"' : '' ; ?>>50</option>
                <option value="100" <?php echo $numPerPage == 100 ? 'selected="true"' : '' ; ?> >100</option>
                <option value="200" <?php echo $numPerPage == 200 ? 'selected="true"' : '' ; ?> >200</option>
            </select>
            <span>条，共{$totalCount}条</span>
        </div>

        <div class="pagination" targetType="navTab" totalCount="{$totalCount}" numPerPage="{$numPerPage}" pageNumShown="10" currentPage="{$currentPage}"></div>

    </div>
</div>